{include file="public/layout" /}
<script type="text/javascript" src="__SKIN__/js/clipboard.min.js"></script>
<body class="eyou_body_xin">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
{include file="order/left" /}
<div id="geduan_div" class="h15"></div>
<div class="page" style="min-width:auto;margin-left:115px;padding-bottom: 15px;">
    <div class="fixed-bar">
        <div class="item-title">
            <ul class="tab-base nc-row">
                <li> <a href='{:url("OrderVerify/index")}' {if condition="'index' == $Think.const.ACTION_NAME"} class="current" {/if}>核销订单</a> </li>
                <li> <a href='{:url("OrderVerify/verification")}' {if condition="'verification' == $Think.const.ACTION_NAME "} class="current" {/if}>核销台</a> </li>
                
            </ul>
            <!-- <div class="fr e-export">
                <a href="javascript:void(0);" onclick="OrderExcelExport(this);" data-url="{:url('Order/ajax_order_excel_export')}" class=""><i class="iconfont e-XLStubiao"></i>导出订单</a>
            </div> -->
        </div>
    </div>
    <div class="flexigrid flexigrid-xin">
        <div class="header-bar">
            <div class="more">
                <div class="search">
                    <div class="content">
                        <form id="searchForm" action="{:url('OrderVerify/index')}" method="get" onsubmit="layer_loading('正在处理');" style="display: unset;">
                            {$searchform.hidden|default=''}
                            <div class="ey-form-item"><label class="users-form-item-label">核销码：</label>
                                <div class="users-form-item-content">
                                    <div class="users-select">
                                        <div tabindex="0" class="users-select-selection">
                                            <!-- 订单号查询 -->
                                            <div class="sDiv2">
                                                <input type="text" size="50" name="verify_code" value="{$Request.param.verify_code}" class="qsbox" style="width: 170px;" placeholder="请输入核销码">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="ey-form-item"><label class="users-form-item-label">核销码状态：</label>
                                <div class="users-form-item-content">
                                    <div class="users-select">
                                        <div tabindex="0" class="users-select-selection">
                                            <div class="">
                                                <select name="status">
                                                    <option value="0" {empty name="$Request.param.status"} selected {/empty}>全部</option>
                                                    <option value="1"  {eq name="$Request.param.status" value="1"} selected {/eq}>待核销</option>
                                                    <option value="2" {eq name="$Request.param.status" value="2"} selected {/eq}>已核销</option>
                                                    <!--<option value="" >已过期</option>-->
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <div class="ey-form-item" style="margin-left: 20px;">
                            <div class="users-form-item-content">
                                <span class="bt-xin" id="submitForm" onclick="OrderQuery();">查询</span>
                                <span class="bt-xin-no" onclick="OrderQuery('reset');">重置</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="geduan-xin"></div>
    <div class="flexigrid flexigrid-xin" style=" padding-right: 1px; ">
        <div class="tableDiv  bubbleInfo">
            {empty name="list"}
            <table cellspacing="0" cellpadding="0" style="width: 100%;">
                <thead>
                    <tr>
                        <th> <div class="">订单信息</div> </th>
                        <th class="w240"> <div class="">单价/数量</div> </th>
                        <th class="w240"> <div class="">核销码</div> </th>
                        <th class="w240"> <div class="">买家</div> </th>
                        <th class="w140"> <div class="">支付方式</div> </th>
                        <th class="w140"> <div class="">核销状态</div> </th>
                        <th class="w140"> <div class="">核销时间</div> </th>
                        <th class="w200"> <div class="">操作员</div> </th>
                    </tr>
                </thead>
                <tbody>
                    
                </tbody>
            </table>
            <div class="no_row">
                <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
            </div>
            {else/}
            {/empty}
            <table cellspacing="0" cellpadding="0" style="width: 100%;">
                <thead>
                    <tr>
                        <th> <div class="">订单信息</div> </th>
                        <th class="w240"> <div class="">单价/数量</div> </th>
                        <th class="w240"> <div class="">核销码</div> </th>
                        <th class="w240"> <div class="">买家</div> </th>
                        <th class="w140"> <div class="">支付方式</div> </th>
                        <th class="w140"> <div class="">核销状态</div> </th>
                        <th class="w140"> <div class="">核销时间</div> </th>
                        <th class="w200"> <div class="">操作员</div> </th>
                    </tr>
                </thead>
                <tbody>
                {volist name="list" id="vo"}
                <tr class="order-empty"><td colspan="8"></td></tr>
                <tr>
                    <td class="biaotou" colspan="8">
                            <span class="mr15">
                                <span class="mr15">订单号：{$vo.order_code} <a class="copy order_code" onclick="OrderCopy();" data-clipboard-text="{$vo.order_code}"><i class="iconfont e-fuzhi basics-color" title="点击复制"></i></a></span>

                                <span class="fr"><i class="iconfont e-shijian mr5"></i>{$vo.add_time}</span>
                            </span>
                    </td>
                </tr>
                <tr>
                    {volist name="$vo.Details" id="do"}
                    {eq name="$i" value="1"}
                    <td>
                        <div class="goods-detail">
                            <div class="goods-image">
                                <a><img src="{$do.litpic}"></a>
                                <!-- <a href="{$do.arcurl}" target="_blank"><img src="{$do.litpic}"></a> -->
                            </div>
                            <div class="goods-info">
                                <p class="goods-title">{$do.product_name}</p>
                                <p class="goods-spec">{$do.product_spec}</p>
                                {if condition="!empty($do.apply_service) && !empty($do.service_id)"}
                                <p class="after-sale"><a href="{:url('ShopService/after_service_details', array('service_id' => $do['service_id'], 'backurl'=>url('ShopService/after_service')))}" title="点击查看详情"><span>{$do.status_name}</span></a></p>
                                {/if}
                            </div>
                        </div>
                    </td>
                    <td class=""><p>￥{$do.product_price} x {$do.num}</p></td>
                    {/eq}
                    {/volist}

                    <td class="" rowspan="{$vo.rowspan}">
                        <p style="color: #636669; font-weight: 600;">
                            {$vo.verify_code}
                        </p>
                    </td>

                    <td class="" rowspan="{$vo.rowspan}">
                        <div class="w220 p0">
                            <p><a class="basics-color" href="javascript:void(0);" data-href="{:url('Member/users_edit', ['id'=>$vo.users_id,'from'=>'money_index','iframe'=>1])}" onclick="openFullframe(this, '会员资料','100%','100%');">{$vo.u_nickname}</a></p>
                            <p>{$vo.name}&nbsp;&nbsp;{$vo.mobile}</p>
                        </div>
                    </td>

                    <td class="" rowspan="{$vo.rowspan}">
                            <span class="am-badge am-badge-secondary">
                                {eq name="$vo.order_source" value="30"}积分兑换{else/}{$pay_method_arr[$vo.pay_name]|default='微信支付'}{/eq}
                            </span>
                    </td>

                    <td class="" rowspan="{$vo.rowspan}">
                        <p>
                            <span class="zt {eq name='$vo.order_status' value='2'}show{else/}none{/eq}" style="color: #2d8cf0;">待核销</span>
                            <span class="zt {eq name='$vo.order_status' value='3'}show{else/}none{/eq}" style="color: #19be6b;">已核销</span>
                        </p>
                    </td>

                    <td class="" rowspan="{$vo.rowspan}">
                        <p>
                            {gt name="$vo.verify_time" value="0"}
                            {$vo.verify_time|MyDate='Y-m-d H:i:s',###}
                            {/gt}
                        </p>
                    </td>
                    <td class="" rowspan="{$vo.rowspan}">
                        <p>
                            管理员
                        </p>
                    </td>
                </tr>

                {volist name="$vo.Details" id="do"}
                {gt name="$i" value="1"}
                <tr>
                    <td>
                        <div class="goods-detail">
                            <div class="goods-image">
                                <a><img src="{$do.litpic}"></a>
                                <!-- <a href="{$do.arcurl}" target="_blank"><img src="{$do.litpic}"></a> -->
                            </div>
                            <div class="goods-info">
                                <p class="goods-title">{$do.product_name}</p>
                                <p class="goods-spec">{$do.product_spec}</p>
                                {if condition="!empty($do.apply_service) && !empty($do.service_id)"}
                                <p class="after-sale"><a href="{:url('ShopService/after_service_details', array('service_id' => $do['service_id'], 'backurl'=>url('ShopService/after_service')))}"><span>{$do.status_name}</span></a></p>
                                {/if}
                            </div>
                        </div>
                    </td>
                    <td class=""><p>￥{$do.product_price} X {$do.num}</p></td>
                </tr>
                {/gt}
                {/volist}
                {/volist}
                </tbody>
            </table>
            
        </div>
        {notempty name="list"}
        <div class="tDiv">
            <div class="tDiv2">
                <!-- <div class="fbutton checkboxall">
                    <input type="checkbox" autocomplete="off" class="checkAll">
                </div>
                <div class="fbutton">
                    <a onclick="batch_del(this, 'ids');" data-url="{:url('Shop/order_del')}" class="layui-btn layui-btn-primary">
                            <span>批量删除</span>
                    </a>
                </div> -->
                {include file="public/page" /}
            </div>
            <div style="clear:both"></div>
        </div>
        {/notempty}
    </div>
</div>

<script type="text/javascript">
    $(function() {

        $(document).keydown(function(event){
            if (event.keyCode ==13) {
                $('#searchForm input[type=text]').each(function(index, item){
                    if ($(item).is(':focus')) {
                        $('#searchForm').submit();
                    }
                });
            }
        });

        $('input[name*=ids]').click(function() {
            if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
                $('.checkAll').prop('checked','checked');
            } else {
                $('.checkAll').prop('checked', false);
            }
        });
        $('input[type=checkbox].checkAll').click(function(){
            $('input[type=checkbox]').prop('checked',this.checked);
        });
    });

    $(document).ready(function() {
        // 表格行点击选中切换
        $('#flexigrid > table>tbody >tr').click(function() {
            $(this).toggleClass('trSelected');
        });
    });


    // 订单号复制
    function OrderCopy() {
        var clipboard1 = new Clipboard(".order_code");
        clipboard1.on("success", function(e) {
            layer.msg("复制成功");
        });
        clipboard1.on("error", function(e) {
            layer.msg("复制失败！请手动复制", {icon: 5});
        });
    }

    // 订单查询
    function OrderQuery(isReset) {
        if (isReset && 'reset' == isReset) {
            window.location.href = "{:url('OrderVerify/index')}";
        } else {
            $('#searchForm').submit();
        }
    }

</script>

{include file="public/footer" /}
<script type="text/javascript">
    try{
        var mt20_1649209614 = sessionStorage.getItem("mt20_1649209614");
        if (mt20_1649209614 == 1){
            $("#geduan_div").removeClass("h15");
        } else {
            $("#geduan_div").addClass("h15");
        }
    }catch(e){}
</script>